public class bitwise {
    public static void main(String[] args) {
        System.out.println("and 运算：");
        System.out.printf("0 AND 1 %d%n",0 & 1);
        System.out.printf("1 AND 1 %d%n",1 & 1);
        System.out.printf("0 AND 0 %d%n",1 & 1);
        System.out.println( "\nor 运算：");
        System.out.printf("0 OR 1 %d%n",0 | 1);
        System.out.printf("0 OR 0 %d%n",0 | 0);
        System.out.printf("1 OR 1 %d%n",1 | 1);

    }
}
